<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>申请页面</title>
  <link rel="stylesheet" href="../../../yl/index.css" />
  <!-- 布局样式 -->
  <link rel="stylesheet" href="../../../yl/style.css" />
  <link rel="stylesheet" href="../../../style/wangeditor.css">
  <link rel="stylesheet" href="../../../yl/mobile.css" />
  <link rel="stylesheet" href="../../../yl/easyui.css" />
  <link rel="stylesheet" href="../../../yl/icon.css" />
</head>

<body>
  <!-- <div id="app"> -->
  <div class="easyui-navpanel" id="app" v-cloak>
    <header>
      <div class="m-toolbar">
        <div class="m-title">{{action=='Add'?'添加申请信息':action=='Modify'?'修改申请信息':''}}</div>
      </div>
    </header>
    <div class="easyui-navpanel panel-body panel-body-nobottom panel-body-noborder" style="height: 3000px"
      id="MainTable" ref="MainTable"
      :data-options="JSON.stringify({ 'TableName': 'subsidy_application_agricultural_machinery', 'form': 'dataForm' ,'primary_key':'Application_SerialNumber' })">
      <div class="yl-main">
        <div class="table_titel">
          <div class="titel">申请信息</div>
        </div>
        <el-form :model="dataForm" ref="form" inline-message="true" style="width: 100%">
          <el-descriptions :column="1" size="large" border>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申请日期</div>
              </template>
              <el-form-item prop="Application_Date" :rules="[{ required: true, message: '请选择申请日期', trigger: 'change' }]">
                <el-date-picker v-model="dataForm.Application_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                  class="borderless-input" type="date" placeholder="请选择申请日期" size="large"></el-date-picker>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">政策发布年份</div>
              </template>
              <el-input-number @change="changeYear" v-model="Year" label="年份"></el-input-number>
              <!-- <el-date-picker @change="changeYear" v-model="Year" value-format="YYYY" size="large" type="year"
                class="borderless-input" placeholder="选择年"></el-date-picker> -->
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">适用政策</div>
              </template>
              <el-form-item prop="Policy_SerialNumber"
                :rules="[{ required: true, message: '请选择适用政策', trigger: 'change' }]">
                <el-select @change="changePolicy" :disabled="!Year" clearable v-model.trim="dataForm.Policy_SerialNumber"
                  placeholder="请选择适用政策" filterable style="width: 100%">
                  <el-option v-for="(item,index) in policy" :key="index" :label="item.Policy_Name"
                    :value="item.Policy_SerialNumber"></el-option>
                </el-select>
              </el-form-item>
  
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申请人身份证号</div>
              </template>
              <el-form-item prop="Applicant_ID" :rules="[{ required: true, message: '请输入申请人身份证号', trigger: 'blur' }]">
                <el-input @input="InputApplicant_ID" class="borderless-input" v-model="dataForm.Applicant_ID"
                  label="申请人身份证号" placeholder="请输入申请人身份证号"></el-input>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申请人姓名</div>
              </template>
              <el-form-item prop="Applicant_Name" :rules="[{ required: true, message: '请输入申请人姓名', trigger: 'change' }]">
                <el-input v-model="dataForm.Applicant_Name" class="borderless-input" label="申请人姓名"
                  placeholder="请输入申请人姓名"></el-input>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">申请人联系方式</div>
              </template>
              <el-form-item prop="Applicant_Contact" :rules="[{ required: true, message: '请输入申请人联系方式', trigger: 'change' }]">
                <el-input v-model="dataForm.Applicant_Contact" class="borderless-input" label="申请人联系方式"
                  placeholder="请输入申请人联系方式"></el-input>
              </el-form-item>
            </el-descriptions-item>
            <el-descriptions-item>
              <template #label>
                <div class="cell-item">附件</div>
              </template>
              <yl-upload drag @success="success" @remove="handleRemove"></yl-upload>
              <!-- <el-upload class="upload-demo" :drag="true" action="#" :auto-upload="false" :show-file-list="true"
                :on-change="handleChange" :on-remove="handleRemove" :file-list="fileList">
                <i class="el-icon-upload"></i>
                <div class="el-upload__text">将文件拖到此处上传，待点击<em>提交</em>后保存</div>
              </el-upload> -->
            </el-descriptions-item>
          </el-descriptions>
        </el-form>
  
        <el-collapse v-if="dataForm.Policy_SerialNumber">
          <el-collapse-item name="1">
            <template #title>
              <div class="table_titel">
                <div class="titel">政策详情(点击查看详情)</div>
              </div>
            </template>
            <el-card class="box-card">
              <el-descriptions :column="1" size="large" border>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">政策名称</div>
                  </template>
                  <el-input disabled v-model="dataForm1.Policy_Name" class="borderless-input" placeholder="请输入政策名称" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">补贴金额</div>
                  </template>
                  <el-input disabled v-model="dataForm1.Subsidy_Amount" class="borderless-input" placeholder="请输入补贴金额" />
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">生效日期</div>
                  </template>
                  <el-date-picker disabled v-model="dataForm1.Effective_Date" format="YYYY-MM-DD"
                    value-format="YYYY-MM-DD" class="borderless-input" type="date" placeholder="请选择生效日期"
                    size="large"></el-date-picker>
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">失效日期</div>
                  </template>
                  <el-date-picker disabled v-model="dataForm1.Expiry_Date" format="YYYY-MM-DD" value-format="YYYY-MM-DD"
                    class="borderless-input" type="date" placeholder="请选择失效日期" size="large"></el-date-picker>
                </el-descriptions-item>
                <el-descriptions-item>
                  <template #label>
                    <div class="cell-item">补贴条件</div>
                  </template>
                  <el-input type="textarea" :autosize="{ minRows: 4}"  disabled v-model="dataForm1.Eligibility_Criteria" class="borderless-input"
                    placeholder="请输入补贴条件" />
                </el-descriptions-item>
              </el-descriptions>
            </el-card>
          </el-collapse-item>
        </el-collapse>
      </div>
    </div>
    <footer class="botton-ann">
      <el-button @click="goBack">返回</el-button>
      <el-button type="primary" plain @click="handleSubmit" :loading="loading">提交</el-button>
    </footer>
  </div>
</body>
<script src="../../../utils/utils.js"></script>
<script src="../../../config/config.js"></script>
<script src="../../../utils/compressor.js"></script>
<script src="../../../utils/wangeditor.js"></script>
<script src="../../../utils/mixins.js"></script>
<script src="../../../yl/vue.js"></script>
<script src="../../../yl/index.js"></script>
<script src="../../../yl/zh-cn.mjs"></script>
<script src="../../../yl/index.iife.min.js"></script>
<script src="../../../yl/jquery.min.js"></script>
<script src="../../../utils/jquery.cookie.js"></script>
<script src="../../../yl/jquery.easyui.min.js"></script>
<script src="../../../yl/jquery.easyui.mobile.js"></script>
<script src="../../../yl/moment.min.js"></script>
<script src="../../../api/request.js"></script>
<script src="./js/add.js"></script>

</html>